package com.wyjy.bkd.presenter;

import android.content.Context;

import com.wyjy.bkd.base.BasePresenter;
import com.wyjy.bkd.bean.UserInfo;
import com.wyjy.bkd.http.LzyCallback;
import com.wyjy.bkd.model.HomeModel;
import com.wyjy.bkd.pv.HomePv;
import com.wyjy.bkd.pv.PresentView;

/**
 * @作者: TJ
 * @时间: 2018/4/14 10:22
 * @描述: 首页
 */
public class HomePresenter extends BasePresenter {

    private Context   mContext;
    private HomePv    mHomePv;
    private HomeModel mHomeModel;


    public HomePresenter(Context context) {
        mContext = context;
    }

    @Override
    public void bindPresentView(PresentView presentView) {
        mHomePv = (HomePv) presentView;
    }


    @Override
    protected void onCreate() {
        super.onCreate();
        mHomeModel = new HomeModel(mCompositeDisposable);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        mHomeModel = null;
    }

    public void getUserInfo(int uid) {
        mHomeModel.getUserInfo(uid, new LzyCallback<UserInfo>() {
            @Override
            public void onNext(UserInfo userInfo) {

            }
        });
    }

}
